var ScrollPosition = {};

ScrollPosition.install = function (Vue, options) {
  Vue.prototype.$scroll = function (el) {
    if (el) {
      return el.scrollTop;
    } else {
      return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
    }
  };
};

export default ScrollPosition;